package com.qfjy.homeWork.fengzhenghui;

/**
 * @Author 小白
 * @Date 2021-11-20 20:14
 */
/**
 * 观察者C
 * */
public class CObserver extends Observer {
    public CObserver() {
    }
    public CObserver(Subject subject) {
        this.subject=subject;
        this.subject.addOb(this);
    }
    @Override
    public void update(String status) {
        if(status.equals("C")){
            System.out.println("C"+"哈哈中奖了，今天吃烧烤");
        }else {
            System.out.println("C"+"哎！又没中……");
        }
    }
}
